import request from '@/request/index.js'
const zhpt = 'zhpt' //http://101.42.107.47:30018文档
const base = 'base' //http://101.42.107.47:30020文档

//获取科研机构列表
export const getScientificListApi = (data) => {
    return request({
        url: `/api/${zhpt}/scientific/console/search`,
        method: 'POST',
        data,
    })
}

//获取城市行政区域信息
export const getCityInfoApi = (params) => {
    return request({
        url: `/api/${base}/dict/sup/region`,
        method: 'GET',
        params,
    })
}

//科研机构新增
export const scientificAddApi = (data) => {
    return request({
        url: `/api/${zhpt}/scientific/add`,
        method: 'POST',
        data,
    })
}

//科研机构批量操作
export const scientificBatchHandleApi = (data) => {
    return request({
        url: `/api/${zhpt}/scientific/batch`,
        method: 'POST',
        data,
    })
}

//根据机构名称获取公司EID
export const getCompanyEidByOrganizationNameApi = (params) => {
    return request({
        url: `/api/${zhpt}/company/eid`,
        method: 'GET',
        params,
    })
}

//公司logo图片上传
export const companyLogoUploadApi = (data) => {
    return request({
        url: `/api/${zhpt}/files/upload/logo`,
        method: 'POST',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
        },
        data,
    })
}

//获取公司logo
export const getCompanyLogoByEidApi = (params) => {
    return request({
        url: `/api/${zhpt}/company/logo`,
        method: 'GET',
        params,
    })
}

//科研机构编辑
export const scientificEditApi = (data) => {
    return request({
        url: `/api/${zhpt}/scientific/edit`,
        method: 'POST',
        data,
    })
}